Skip to main content

New order

POST 

/bot-gateway-service/api/v3/order

Send in a new order.

  • LIMIT_MAKER are LIMIT orders that will be rejected if they immediately match and trade as a taker.
  • STOP_LOSS and TAKE_PROFIT will execute a MARKET order when the stopPrice is reached.
  • Any LIMIT or LIMIT_MAKER type order can make an iceberg order by sending an icebergQty.
  • Any order with an icebergQty MUST have timeInForce set to GTC.
  • MARKET orders using quantity specify how much a user wants to buy or sell based on the market price.
  • MARKET orders using quoteOrderQty specify the amount the user wants to spend (when buying) or receive (when selling) of the quote asset; the correct quantity will be determined based on the market liquidity and quoteOrderQty.
  • MARKET orders using quoteOrderQty will not break LOT_SIZE filter rules; the order will execute a quantity that will have the notional value as close as possible to quoteOrderQty.
  • The same newClientOrderId can be accepted only when the previous one is filled. otherwise, the order will be rejected. Trigger order price rules against market price for both MARKET and LIMIT versions:
  • Price above market price: STOP_LOSS BUY, TAKE_PROFIT SELL.
  • Price below market price: STOP_LOSS SELL, TAKE_PROFIT BUY.

Request

Body

New order submission request.

    symbol stringnullable

    Symbol of the trading pair (e.g., XCBETH).

    side stringnullable

    Order side: e.g. BUY or SELL (required).

    type stringnullable

    Order type , e.g. LIMIT (required).

    • Possible values:
      • LIMIT
      • MARKET
      • STOP_LOSS_LIMIT
      • TAKE_PROFIT_LIMIT
      • STOP_LOSS_LIMIT
      • LIMIT_MAKER
      • STOP_LOSS
      • TAKE_PROFIT
    timeInForce stringnullable

    Order time in force (optional).

    • Possible values:
      • Good till Canceled (GTC)
      • Immediate or Cancel (IOC)
      • Fill-Or-Kill (FOK)
    quantity doublenullable

    The quantity of the asset to buy or sell. (required)

    quoteOrderQty doublenullable

    The quote order quantity (optional).

    price doublenullable

    The price per unit of the asset (required for limit order).

    newClientOrderId stringnullable

    The unique identifier for the order provided by the client (e.g., Guid) (required).

    strategyId int32nullable

    The strategy ID for the order (optional).

    • Identify an order as part of a strategy.
    strategyType int32nullable

    The type of strategy for the order (optional).

    • The value cannot be less than 1000000.
    stopPrice doublenullable

    The stop order activation price (optional).

    • Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
    trailingDelta doublenullable

    The trailing stop delta for trailing stop orders (optional).

    • Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
    icebergQty doublenullable

    The quantity of the iceberg order (optional).

    • Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.
    newOrderRespType stringnullable

    The type of response expected for the new order (e.g., FULL) (optional).

    • Set the response JSON.
    • MARKET and LIMIT order types default to FULL, all other orders default to ACK.
    recvWindow int64nullable

    The number of milliseconds after timestamp the request is valid for (optional).

    • RecvWindow is optional.
    • The value cannot be greater than 60000.
    • If recvWindow is not sent, it defaults to 5000.

Responses

Success

Schema

    symbol stringnullable

    Symbol of the trading pair (e.g., XCBETH).

    orderId int64

    The unique identifier of the order of type big integer generated by the Ping Exchange.

    orderListId int64

    The unique identifier of the order list generated by the Ping Exchange.

    • Unless OCO, value will be -1
    clientOrderId stringnullable

    The unique identifier (Guid) assigned by the client for the order.

    • It is the client’s original ClientOrderId of the order from the request.
    price stringnullable

    The price is the client’s original price of the order from the request.

    origQty stringnullable

    The original quantity requested by the client.

    executedQty stringnullable

    The quantity of the base asset that has been executed in the order (e.g., 0.5).

    • executedQty is how many base asset is matched in the order, which is 0.5 in the above example.
    cummulativeQuoteQty stringnullable

    The total cost of buying the base asset in the quote asset.

    • It is how much the user paid for buying base asset in quote asset.
    status stringnullable

    The status of the order.

    • Possible values:
      • NEW
      • PARTIALLY_FILLED
      • FILLED
      • CANCELED
      • REJECTED
      • EXPIRED
    timeInForce stringnullable

    Order time in force.

    • Possible values:
      • Good till Canceled (GTC)
      • Immediate or Cancel (IOC)
      • Fill-Or-Kill (FOK)
    type stringnullable

    Order type , e.g. LIMIT.

    • Possible values:
      • LIMIT
      • MARKET
      • STOP_LOSS_LIMIT
      • TAKE_PROFIT_LIMIT
      • STOP_LOSS_LIMIT
      • LIMIT_MAKER
      • STOP_LOSS
      • TAKE_PROFIT
    side stringnullable

    Order side: e.g. BUY or SELL.

    stopPrice stringnullable

    The stop order activation price.

    • Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
    icebergQty stringnullable

    The quantity of the iceberg order.

    • Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.
    transactTime int64

    The timestamp of the transaction.

    updateTime int64

    The timestamp of the last update.

    isWorking boolean

    Indicates if the order is currently placed in the order book or not.

    • It’s the same “w” field returned from websocket executionReport event.
    workingTime int64

    The time when the order was last marked as working.

    origQuoteOrderQty stringnullable

    The original quote order quantity.

    selfTradePreventionMode stringnullable

    The mode for self-trade prevention.

    • Possible values: NONE, EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH
Loading...